@echo off

:: 创建发布目录
mkdir release
del /Q release\*

:: 打包前端
cd frontend
call npm install
call npm run build
cd ..

:: 复制前端文件
xcopy /E /I /Y frontend\dist\* release\

:: 编译后端
set CGO_ENABLED=1
go build -o release\mypassword.exe main.go

:: 复制配置文件和其他必要文件
copy conf\app.conf release\conf\
mkdir release\cert 
mkdir release\data
